package com.yixing.tech.system.po;

import com.yixing.tech.common.base.BasePO;
import com.yixing.tech.common.enums.Status;
import com.yixing.tech.common.enums.UserType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.data.mongodb.core.index.Indexed;

/**
 * @author yixing tech
 * at 2021/12/15
 * describe：
 */
@Data
@Accessors(chain=true)
@NoArgsConstructor
@AllArgsConstructor
public class User extends BasePO {
    String name;
    @Indexed(unique=true)
    String loginName;
    String password;
    String phone;
    Role role;
    Role selfRole;
    UserType type;
    Integer status = Status.def.ordinal();
    Boolean isSuper = false;
    Boolean isAdmin;
    String headPic;
    String headPicUrl;
    String desc;
    String code;
    String email;
    String sessionKey;
    String unionId;
    @Indexed
    Department department;



}
